#!/usr/bin/python3
import sys

try:
    t = int(input())
    if t < 1 or t > 10:
        sys.exit(0)
    for i in range(t):
        n = int(input())
        d = []
        for item in input().split():
            if int(item) in d :
                d.remove(int(item))
            else:
                d.append(int(item))
        print("Case #%d: %d" % (int(i+1),d[-1]))

except ValueError:
    pass
except EOFError:
    pass
except MemoryError:
    pass
